from typing import List
class Solution:
    def rob(self, nums: List[int]) -> int:
        cur, pre = 0, 0
        for num in nums:
            print(max(pre + num, cur),pre, cur)
            cur, pre = max(pre + num, cur), cur

        return cur

a=[2,23,9,3,20]
x=Solution()
print(x.rob(a))